package cn.qidisoft.edu.hzjt.utils;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class SpringUtil implements ApplicationContextAware {

  public static ApplicationContext apc = null;

  public void setApplicationContext(ApplicationContext apc) throws BeansException {
    this.apc = apc;
  }

  public static Object getBean(String beanName) {
    return apc.getBean(beanName);
  }



}
